package com.baosf.serviceproduct.service.impl;

import com.baosf.model.product.Product;
import com.baosf.serviceproduct.service.ProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Slf4j
@Service
public class ProductServiceImpl implements ProductService {
    @Override
    public Product getProductById(Long productId) {
        log.info("get product by id: {}", productId);
        Product product = new Product();
        product.setId(productId);
        product.setPrice(new BigDecimal("9.9"));
        product.setProductName("苹果-"+productId);
        product.setNum(100);
        return product;
    }
}
